#include<iostream>
#include<string>
using namespace std;

string path;
void dfs(int n, int level)
{
    if (level > n)
    {
        cout << path << endl;
        return;
    }

    path.push_back('N');
    dfs(n, level + 1);
    path.pop_back();

    path.push_back('Y');
    dfs(n, level + 1);
    path.pop_back();
}

int main()
{
    int n = 0;
    cin >> n;
    dfs(n, 1);
    return 0;
}